package cn.iune.web.erp.controllers;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;

import cn.iune.erp.setting.ISettingService;

@Controller
public class SettingControllers {
	
	@Autowired
	private ISettingService settingService;
	
	//工单录入时调用
	//获取单据初始化参数
	@RequestMapping(value="/system/systemBilltype/getBillParam",method=RequestMethod.GET)
	@ResponseBody
	public Map<String,Object> getBillParam(
			@RequestParam(value="billType",required=true) String billType
			,@RequestParam(value="ognID",required=true) String enterpriseNo
			) {
		
		Map<String,Object> billParam = settingService.getBillParam(billType, enterpriseNo);
		return billParam;
	}

	//获取url
	@RequestMapping(value="/system/sysInfo/getSysInfoUrlByID",method=RequestMethod.GET)
	@ResponseBody
	public JSONObject sysInfoGetUrlByID(@RequestParam String id) {
		return settingService.getSysInfoUrlByID(id);
	}

}
